﻿namespace Itech_Run.Sys.Application.Contracts.Dto
{
    public class SysModuleApiPathDto
    {
        public string Path { get; set; }

        public List<string> ChildPaths { get; set; } = new List<string>();

        public override bool Equals(object? obj)
        {
            //Check for null and compare run-time types.
            if ((obj == null) || !this.GetType().Equals(obj.GetType()))
            {
                return false;
            }
            else
            {
                SysModuleApiPathDto target = (SysModuleApiPathDto)obj;
                return (Path == target.Path);
            }
        }

        public override int GetHashCode()
        {
            return Path.GetHashCode();
        }
    }
}
